# encoding: utf-8
require 'json'
class Upload < Controller


  def add

    imgobj=ImageinfoModel.new
    imgobj.whois = @params[:whois]
    imgobj.imageurl=@others
    imgobj.sapcein=@params[:spacein]
    imgobj.styles=@params[:styles]
    imgobj.department=@params[:department]
    if imgobj.save
      self.outjsonp("{state:'ok'}")
    else
      self.outjsonp("{state:'can not save}")
    end
  end

end

